﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using umbraco.interfaces;
using umbraco.cms.businesslogic.web;
using umbraco.presentation.nodeFactory;
using umbraco.cms.businesslogic;

namespace Our.Umbraco.uDbCompare
{
    public class uDbCompareTasks : ITask
    {
        #region ITask Members

        public string Alias { get; set; }

        public bool Delete()
        {
            return uDbCompareCMSNode.Delete(ParentID);
        }

        public int ParentID { get; set; }

        public bool Save()
        {
            uDbCompareCMSNode.MakeNew(_userId, Alias);
            return true;
        }

        public int TypeID { get; set; }

        private int _userId;
        public int UserId
        {
            set { _userId = value; }
        }

        #endregion
    }
}
